Skip to content

更新投放计划

更新投放计划

请求参数类型描述
plan_idstring投放计划ID
jsonobject声明请求的JSON数据结构
modify_contentobject修改内容
plan_namestring投放计划名称
delivery_end_timestring结束可用时间
total_countinteger总库存
user_limitinteger单用户限领
daily_limitinteger单日限领
recommend_wordstring营销标签
php
$instance->v3->marketing->partner->deliveryPlan->deliveryPlans->_plan_id_->patchAsync([
  'plan_id' => '12000',
  'json' => [
    'modify_content' => [
      'plan_name'         => '冬季饮料投放',
      'delivery_end_time' => '2025-01-01T00:00:00+08:00',
      'total_count'       => 1,
      'user_limit'        => 1,
      'daily_limit'       => 1,
      'recommend_word'    => '天天有惊喜',
    ],
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/marketing/partner/delivery-plan/delivery-plans/{plan_id}')->patchAsync([
  'plan_id' => '12000',
  'json' => [
    'modify_content' => [
      'plan_name'         => '冬季饮料投放',
      'delivery_end_time' => '2025-01-01T00:00:00+08:00',
      'total_count'       => 1,
      'user_limit'        => 1,
      'daily_limit'       => 1,
      'recommend_word'    => '天天有惊喜',
    ],
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/marketing/partner/delivery-plan/delivery-plans/{plan_id}']->patchAsync([
  'plan_id' => '12000',
  'json' => [
    'modify_content' => [
      'plan_name'         => '冬季饮料投放',
      'delivery_end_time' => '2025-01-01T00:00:00+08:00',
      'total_count'       => 1,
      'user_limit'        => 1,
      'daily_limit'       => 1,
      'recommend_word'    => '天天有惊喜',
    ],
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->marketing->partner->deliveryPlan->deliveryPlans->_plan_id_->patch([
  'plan_id' => '12000',
  'json' => [
    'modify_content' => [
      'plan_name'         => '冬季饮料投放',
      'delivery_end_time' => '2025-01-01T00:00:00+08:00',
      'total_count'       => 1,
      'user_limit'        => 1,
      'daily_limit'       => 1,
      'recommend_word'    => '天天有惊喜',
    ],
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/marketing/partner/delivery-plan/delivery-plans/{plan_id}')->patch([
  'plan_id' => '12000',
  'json' => [
    'modify_content' => [
      'plan_name'         => '冬季饮料投放',
      'delivery_end_time' => '2025-01-01T00:00:00+08:00',
      'total_count'       => 1,
      'user_limit'        => 1,
      'daily_limit'       => 1,
      'recommend_word'    => '天天有惊喜',
    ],
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/marketing/partner/delivery-plan/delivery-plans/{plan_id}']->patch([
  'plan_id' => '12000',
  'json' => [
    'modify_content' => [
      'plan_name'         => '冬季饮料投放',
      'delivery_end_time' => '2025-01-01T00:00:00+08:00',
      'total_count'       => 1,
      'user_limit'        => 1,
      'daily_limit'       => 1,
      'recommend_word'    => '天天有惊喜',
    ],
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
planobject投放计划详情
plan_idstring投放计划ID
plan_namestring投放计划名称
plan_statestring投放计划状态
PLAN_CREATING | PLAN_CREATED | PLAN_TERMINATING | PLAN_TERMINATED | PLAN_EXPIRED | PLAN_DELIVERING | PLAN_PAUSED 枚举值之一
delivery_start_timestring开始可用时间
delivery_end_timestring结束可用时间
stock_idstring批次ID
product_coupon_idstring商品券ID
recommend_wordstring营销标签
brand_idstring品牌ID
total_countinteger总库存
user_limitinteger单用户限领
daily_limitinteger单日限领

参阅 官方文档

Published on the GitHub by TheNorthMemory